//
//  VersionInformationViewController.m
//  shise
//
//  Created by 徐国庆 on 14/12/18.
//  Copyright (c) 2014年 MZP. All rights reserved.
//

#import "VersionInformationViewController.h"

@interface VersionInformationViewController ()<UITextViewDelegate>
@property(nonatomic, retain)NSMutableArray *array;
//@property(nonatomic,retain)UITableView *tableView;
@property(nonatomic,retain)UIImageView *logoImage;//我们的图标
@property(nonatomic,retain)UILabel *labelwe;//我们的口号
@property(nonatomic,retain)UITextView *textView;

@end

@implementation VersionInformationViewController
//- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
//{
//    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
//    if (self) {
//        self.array = [NSMutableArray array];
//    }
//    return self;
//}

- (void)dealloc
{
    [_array release];
    [_logoImage release];
    [_labelwe release];
    [_textView release];
    [super dealloc];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.title = @"关于我们";
    self.view.backgroundColor = [UIColor whiteColor];
    
    
    
    self.logoImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"binggan.png"]];
    self.logoImage.frame = CGRectMake(self.view.frame.size.width/3, self.view.frame.size.height/6, self.view.frame.size.width/3, self.view.frame.size.height/5);
    [self.view addSubview:self.logoImage];
    [_logoImage release];
    
                                                       
    self.labelwe = [[UILabel alloc]initWithFrame:CGRectMake(self.view.frame.size.width/6, self.view.frame.size.height/3 + 10, self.view.frame.size.width, self.view.frame.size.height/8)];
    self.labelwe.text = @"";
    [self.view addSubview:self.labelwe];
    [_labelwe release];
    
    
    ////////////////////////////////////////
    
    
    
    self.textView = [[UITextView alloc]initWithFrame:CGRectMake(self.view.frame.size.width/19, self.view.frame.size.height/2, self.view.frame.size.width/10*9, self.view.frame.size.height/2-59)];
    
    //设置字体大小
    //self.textView.font = [UIFont fontWithName:@"Arial" size:18];
    self.textView.font = [UIFont boldSystemFontOfSize:16];
    
    //设置背景色
    self.textView.backgroundColor = [UIColor whiteColor];
    //显示的文本
    self.textView.text = @"      本软件没有拥有本平台网站的部分内容（包括文字，图片，以及一些第三方提供的版权作品）的版权。\n      任何没有被授权的浏览，复制，打印和传播属于本平台网站内信息内容，如果您用于商业目的且所有信息内容及其任何部分的使用都不必要包括此版权声明如下：本平台产品，信息内容，技术以及所有程序都属于我们的知识产权。    \n\n      特此声明!\n\n  蓝鸥科技MagicQueenXmax团队版权所有";
    //设置自定义高度
    self.textView .autoresizingMask = UIViewAutoresizingFlexibleHeight;
    //是否可以拖动,默认YES。关闭暂时拖着任何
    self.textView.scrollEnabled = YES;
    
    //返回键的类型
    //self.textView.returnKeyType = UIReturnKeyDefault;
    //键盘类型
    //self.textView.keyboardType = UIKeyboardTypeDefault;
    //是否可以编辑
    self.textView.editable = NO;
    
    //设置圆角边框，先给一个圆角半径的值
    self.textView.layer.cornerRadius = 10;
    self.textView.layer. masksToBounds = YES;
    
    //设置边框颜色
    self.textView.layer.borderWidth = 5;
    self.textView.layer.borderColor = [[UIColor colorWithRed:1 green:1 blue:1 alpha:1] CGColor];
    
    //给图层添加背景图片
    //self.textView.layer.contents = (id)[UIImage imageNamed:@"lan2.jpg"].CGImage;
    self.textView.delegate = self;
    
    //自适应
    [self setAutomaticallyAdjustsScrollViewInsets:NO];
    
    //默认值是NO（YES时，将自动禁用回车键时，文本组件具有零长度的内容，并且将自动启用时，文本组件具有非零长度的内容）
    self.textView.enablesReturnKeyAutomatically = YES;
    [self.view addSubview:self.textView];
    
    [_textView release];
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
